#include<iostream>
#include<vector>
using namespace std;
int maxArea(vector<int>& height) {
    int first = 0;
    int second = height.size()-1;
    int maxArea = 0;
    while(first<second)
    {
        int area = min(height[first],height[second])*(second-first);
        if(area>maxArea)
            maxArea = area;
        if(height[first]<height[second])
            first++;
        else
            second--;
    }
    return maxArea;
}
int  main()
{
    vector<int> heigth;
    cout<<"enter the heigth:"<<endl;
    for(int i=0;i<2;i++)
    {
        int a;
        cin>>a;
        heigth.push_back(a);
    }
    int result = maxArea(heigth);
    cout<<"the max area is:"<<endl;
    cout<<result;
    return 0;
}